class Routines extends Mutator
	config(UnitedMut);
//--------------------------------------------------------------------------------------------------
function KickPlayer(PlayerController C, string target_msg, optional string broadcast_msg)
{
	local string pName;
	
	if (C != None && !Level.Game.AccessControl.IsAdmin(C) && NetConnection(C.Player)!=None )
    {
		if (C.PlayerReplicationInfo!=none)
			pName=C.PlayerReplicationInfo.PlayerName;
		C.ClientNetworkMessage("AC_Kicked",target_msg);
		
		if (C.Pawn != none && Vehicle(C.Pawn) == none)
			C.Pawn.Destroy();
		if (C != None)
			C.Destroy();
		
		if (pName!="" && broadcast_msg !="")
			Level.Game.Broadcast(Self,broadcast_msg);
    }
}
//--------------------------------------------------------------------------------------------------
function Mutator GetMutator(string mutname)
{
	local Mutator M;
	local class<Mutator> mutClass;
	
	mutClass = class<Mutator>(DynamicLoadObject(mutname, class'Class'));
	if (mutClass == None)
		return none;
	
	for (M = Level.Game.BaseMutator; M != None; M = M.NextMutator)
	{
		if (M.Class == mutClass)
			return M;
	}
	
	Level.Game.AddMutator(mutname);
	
	for (M = Level.Game.BaseMutator; M != None; M = M.NextMutator)
	{
		if (M.Class == mutClass)
			return M;
	}
	return none;	
}
//--------------------------------------------------------------------------------------------------